package graduation.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="apply")
public class Apply {
	private Integer id;
	private String sender;//申请人邮箱
	private String name;
	private String receiver;//接收人邮箱
	private Integer type;//申请类型type（1-请假，2-加班，3-出差）
	private Date sendDate = new Date();//发送时间(默认Date now）
	private String dateRange;//申请时间段daterange
	private String info;//申请信息
	private String outAddress;//出差地点
	private String userId;//用户id
	@Column(name="deal_status")
	private Boolean dealStatus = false;//（boolean，默认值false）
	@Column(name="deal_result")
	private Boolean dealresult = false;//批复结果dealresult （boolean，默认值false）
	@Column(name="reades")
	private Boolean reades = false;//是否已读read（boolean，默认值false）
	@Id
	@Column(name = "id", nullable = false, unique = true)
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getSender() {
		return sender;
	}
	public void setSender(String sender) {
		this.sender = sender;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getReceiver() {
		return receiver;
	}
	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}
	public Integer getType() {
		return type;
	}
	public void setType(Integer type) {
		this.type = type;
	}
	public Date getSendDate() {
		return sendDate;
	}
	public void setSendDate(Date sendDate) {
		this.sendDate = sendDate;
	}
	public String getDateRange() {
		return dateRange;
	}
	public void setDateRange(String dateRange) {
		this.dateRange = dateRange;
	}
	public String getInfo() {
		return info;
	}
	public void setInfo(String info) {
		this.info = info;
	}
	public String getOutAddress() {
		return outAddress;
	}
	public void setOutAddress(String outAddress) {
		this.outAddress = outAddress;
	}
	public Boolean getDealStatus() {
		return dealStatus;
	}
	public void setDealStatus(Boolean dealStatus) {
		this.dealStatus = dealStatus;
	}
	public Boolean getDealresult() {
		return dealresult;
	}
	public void setDealresult(Boolean dealresult) {
		this.dealresult = dealresult;
	}
	public Boolean getReades() {
		return reades;
	}
	public void setReades(Boolean reades) {
		this.reades = reades;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	@Override
	public String toString() {
		return "Apply [id=" + id + ", sender=" + sender + ", name=" + name + ", receiver=" + receiver + ", type=" + type
				+ ", sendDate=" + sendDate + ", dateRange=" + dateRange + ", info=" + info + ", outAddress="
				+ outAddress + ", userId=" + userId + ", dealStatus=" + dealStatus + ", dealresult=" + dealresult
				+ ", reades=" + reades + "]";
	}
	
	
}
